package com.jsu.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.model.user.pojo.PointDetail;
import org.example.model.user.pojo.Rule;

import java.util.List;

@Mapper
public interface PointDetailMapper extends BaseMapper<PointDetail> {
    @Select("SELECT * FROM point_detail WHERE user_id LIKE CONCAT('%', #{keyword}, '%') " +
            "OR point_rule_id LIKE CONCAT('%', #{keyword}, '%') " +
            "OR point_num LIKE CONCAT('%', #{keyword}, '%')")
    List<PointDetail> searchDetailByKeyword(@Param("keyword") String keyword);
}
